package com.nai365.nart.pay.feign;

import com.nai365.nart.common.core.constant.SecurityConstants;
import com.nai365.nart.common.core.constant.ServiceNameConstants;
import com.nai365.nart.common.core.util.R;
import com.nai365.nart.pay.entity.Order;
import com.nai365.nart.pay.entity.PayOnBehalf;
import com.nai365.nart.pay.vo.PayOnBehalfRetuenVo;
import com.nai365.nart.pay.vo.PayOrderResVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(contextId = "RemoteUpayService", value = ServiceNameConstants.NART_PAY_BIZ)
public interface RemoteUpayService {

	@PostMapping("/pay/orderPay")
	public R<String> payOrder(@RequestBody Order order, @RequestHeader(SecurityConstants.FROM) String from);

	@PostMapping("/pay/PayOnBehalf")
	public R<Map<String,String>>  PayOnBehalf(@RequestBody PayOnBehalf payOnBehalf);

	@GetMapping("/pay/findPayOrderByOderId/orderId")
	public R<PayOrderResVo> findPayOrderByOderId(@PathVariable("orderId")String orderId);

	@GetMapping("/pay/findOnBehalfByOderId/orderId")
	public R<PayOnBehalfRetuenVo> findOnBehalfByOderId(@PathVariable("orderId")String orderId);
}
